package kpi.java_training.testing.commands;

import kpi.java_training.testing.Testing;

/**
 *  Class implements undo command
 */
public class UndoCommand extends Command {

    public UndoCommand(Testing test) {
        super(test);
    }

    @Override
    public String toString() {
        return "Returning one step backward...";
    }

    @Override
    public void execute() {
        test.stepBack();
    }

    @Override
    public boolean itsMe(String string) {
        return string.equals("@undo");
    }
}
